package com.yingxin.yx.framework.commons;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;


/**
 * @author fanchao
 */
@Data
@ToString
@NoArgsConstructor
public class StatusCode implements Serializable {

    private static final long serialVersionUID = 2883746088787775724L;

    private String code;

    private String message;

    public StatusCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return StringUtils.isEmpty(message)?"":message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
